package edu.sctu.practice.class02.renzhaoxu.assign03.assign03_02;

/**
 * Created by Administrator on 2015/10/30.
 */
     public class ComparableCircle extends Circle implements Comparable {

    @Override
    public int compareTo(Object o) {

        if (getRadius() > ((Circle) o).getRadius())
            return 1;
        else if (getRadius() < ((Circle) o).getRadius())
            return -1;
        else
            return 0;
    }

    public ComparableCircle(double r) {

        super(r);
    }
}
